package org.goldenport.g3.sample

import org.goldenport.g3._
import org.goldenport.g3.adapters._
import org.goldenport.g3.messages._
import org.goldenport.g3.messages.datastore._
import org.goldenport.util.QSymbol
import org.goldenport.wpath.WQuery

/**
 * @since   Aug.  5, 2010
 * @version Jan. 17, 2011
 * @author  ASAMI, Tomoharu
 */
case class MockDataStoreAdapter(anUri: String) extends DataStoreAdapter(
  driver = new MockDataStoreDriver(anUri)) {
}

class MockDataStoreDriver(val uri: String) extends G3DataStoreDriver {
  def new_Agent(cmd: G3Command, ctx: G3AgentContext) = new MockDataStoreDriverAgent(uri, ctx)
}

class MockDataStoreDriverAgent(uri: String, context: G3AgentContext) extends G3DataStoreDriverAgent(uri, context, EmptyRecordClassSpace) {
  protected def fetch_Record(kind: QSymbol, id: String): Either[G3Event, Record] = {
    error("not implemented yet.")
  }

  protected def fetch_Records(kind: QSymbol, ids: List[Any]): Either[G3Event, RecordSet] = {
    error("not implemented yet.")
  }

  protected def query_Records(kind: QSymbol, query: WQuery): Either[G3Event, RecordSet] = {
    error("not implemented yet.")
  }

  protected def delete_Id(msg: Delete, id: String): G3Event = {
    error("not implemented yet.")
  }

  def post(msg: Post) = {
    error("")
    
  }

  def put(msg: Put) = {
    error("")
  }

  def delete(msg: Delete) = {
    error("")
  }

  def mkcol(msg: Mkcol) = {
    error("")
    
  }

  def create(msg: CreateKind) = {
    error("")
    
  }

  def create(msg: CreateRecordClass) = {
    error("")
    
  }

  def fetch(msg: FetchRecord) = {
    error("")
    
  }

  def query(msg: QueryRecord) = {
    error("")
    
  }

  def query(msg: QueryRecordExample) = {
    error("")
  }

  def query(msg: QueryRecordExpression) = {
    error("")
    
  }

  def insert(msg: InsertRecord) = {
    error("")
    
  }

  def insert(msg: InsertRecordSet) = {
    error("")
    
  }

  def update(msg: UpdateRecord) = {
    error("")
    
  }

  def update(msg: UpdateRecordSet) = {
    error("")
    
  }

  def delete(msg: DeleteRecordId) = {
    error("")
    
  }

  def delete(msg: DeleteRecordExample) = {
    error("")
    
  }

  def delete(msg: DeleteRecordExpression) = {
    error("")
    
  }

  def drop(msg: DropKind) = {
    error("")
    
  }
}
